﻿
using Ellwood.Manage.Common.Core.Basis.Mapper.DTO;
using Ellwood.Manage.Common.ValiDataRules;
using SqlSugar;

namespace Ellwood.Manage.Mapper.EntityDto;

/// <summary>
/// 用户管理DTO
/// </summary>
public class SysUserDto: BaseDto
{
    /// <summary>
    /// 用户ID
    /// </summary>
    public int UserId { get; set; }
    
    /// <summary>
    /// 用户名
    /// </summary>
    [EllRequired("用户名不能为空！")]
    public string? UserName { get; set; }

    /// <summary>
    /// 登陆账号
    /// </summary>
    [EllRequired("登陆账号不能为空！")]
    public string? Account { get; set; }
    
    /// <summary>
    /// 密码
    /// </summary>
    [SugarColumn(DefaultValue = "123456")]
    public string? Password { get; set; }
    
    /// <summary>
    /// 电话
    /// </summary>
    public string? Phone { get; set; }
    
    /// <summary>
    /// 手机号
    /// </summary>
    //[EllRequired("手机号不能为空！")]
    [EllValueIsNum("手机号必须为数字！")]
    public string? Mobile { get; set; }
    
    /// <summary>
    /// 住址
    /// </summary>
    public string? Address { get; set; }
    
    /// <summary>
    /// 邮箱
    /// </summary>
    public string? Email { get; set; }
    
    /// <summary>
    /// QQ号
    /// </summary>
    /*[EllValueIsNum("QQ号必须为数字！")]*/
    public long Qq { get; set; }
    
    /// <summary>
    /// 微信号
    /// </summary>
    public string? WeChat { get; set; }
    
    /// <summary>
    /// 性别 1男（默认） 2女 0未知
    /// </summary>
    public int Sex { get; set; }
    
    /// <summary>
    /// 用户状态 0正常 1冻结 2删除
    /// </summary>
    public int Status { get; set; }
    
    /// <summary>
    /// 删除标识符 0正常 1删除
    /// </summary>
    public int DeleteFlag { get; set; }
    
    /// <summary>
    /// 上次登陆时间
    /// </summary>
    public DateTime LastLoginTime { get; set; }
    
}